home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 17 / AMIGAplus Sonderheft 17 (1999)(ICP)(DE)[!].iso / asm_includes / rtgmaster / rtgsublibs.i < prev    next >
Text File  |  1996-06-08  |  15KB  |  312 lines

  1. ;
  2. ;     $VER: rtgsublibs.i 1.006 (08 Jun 1996)
  3. ;
  4.  
  5.         IFND    RTGSUBLIBS_I
  6. RTGSUBLIBS_I    SET     1
  7.  
  8.         IFND    UTILITY_TAGITEM_I
  9.         Include "utility/tagitem.i"
  10.         ENDC
  11.  
  12.         IFND    EXEC_TYPES_I
  13.         Include "exec/types.i"
  14.         ENDC
  15.  
  16.         IFND    EXEC_NODES_I
  17.         Include "exec/nodes.i"
  18.         ENDC
  19.  
  20. * The TagItem ID's (ti_Tag values) for OpenRtgScreen()
  21. *
  22. * Information like width, height, screenmode to use, depth and overscan
  23. * information is located in the ScreenReq structure which must be passed
  24. * to OpenRtgScreen().  The RtgScreenModeReq() function creates these
  25. * ScreenReq structures for you.
  26.  
  27.     ENUM TAG_USER+1           ;rtg_Tags (OpenRtgScreen)
  28.  
  29.     EITEM rtg_Buffers       ;[1] You can use this tag to specify the number
  30.                             ;of screen buffers for your screen.  Setting this
  31.                             ;to 2 or 3 will allow you to do Double or Triple
  32.                             ;buffering.  Valid values are 1, 2 or 3.
  33.     EITEM rtg_Interleaved   ;[FALSE] Specifying TRUE will cause bitmaps to
  34.                             ;be allocated interleaved.  OpenRtgScreen will
  35.                             ;fail if bitplanes cannot be allocated that way
  36.                             ;unlike Intuition/OpenScreenTagList().
  37.     EITEM rtg_Draggable     ;[TRUE] Specifying FALSE will make the screen
  38.                             ;non-draggable.  Do not use without good reason!
  39.     EITEM rtg_Exclusive     ;[FALSE] Allows screens which won't share the
  40.                             ;display with other screens.  Use sparingly!
  41.  
  42. ;    EITEM rtg_ChunkySupport ;[0] This LONG is used to indicate which
  43. ;                            ;Chunky modes this application supports.  A
  44. ;                            ;set bit means the mode is supported:
  45. ;    ;     
  46. ;    ;    | Pixels  | Pixel|Color| Pixel 
  47. ;    ; Bit|represent| size |space| layout
  48. ;    ;------------------------------------------------------------------
  49. ;    ;  0  TrueColor  LONG   RGB   %00000000 rrrrrrrr gggggggg bbbbbbbb  ARGB32
  50. ;    ;  1  TrueColor 3 BYTE  RGB   %rrrrrrrr gggggggg bbbbbbbb           RGB24
  51. ;    ;  2  TrueColor  WORD   RGB   %rrrrrggg gggbbbbb                    RGB16
  52. ;    ;  3  TrueColor  WORD   RGB   %0rrrrrgg gggbbbbb                    RGB15
  53. ;    ;  4  TrueColor  LONG   BGR   %00000000 bbbbbbbb gggggggg rrrrrrrr  ABGR32
  54. ;    ;  5  TrueColor 3 BYTE  BGR   %bbbbbbbb gggggggg rrrrrrrr           BGR24
  55. ;    ;  6  TrueColor  WORD   BGR   %bbbbbggg gggrrrrr                    BGR16
  56. ;    ;  7  TrueColor  WORD   BGR   %0bbbbbgg gggrrrrr                    BGR15
  57. ;    ;  8  TrueColor  LONG   RGB   %rrrrrrrr gggggggg bbbbbbbb 00000000  RGBA32
  58. ;    ;  9  ColorMap   BYTE   -     -                                     LUT8
  59. ;    ; 10  Graffiti   BYTE   -     - (Graffiti style chunky, very special)
  60. ;    ; 11  TrueColor  WORD   RGB   %gggbbbbb 0rrrrrgg                    RGB15PC
  61. ;    ; 12  TrueColor  WORD   BGR   %gggrrrrr 0bbbbbgg                    BGR15PC
  62. ;    ; 13  TrueColor  WORD   RGB   %gggbbbbb rrrrrggg                    RGB16PC
  63. ;    ; 14  TrueColor  WORD   BGR   %gggrrrrr bbbbbggg                    BGR16PC
  64. ;    ; 15  TrueColor  LONG   BGR   %bbbbbbbb gggggggg rrrrrrrr 00000000  BGRA32
  65. ;
  66. ;    ; This table is by no means complete.  There are probably more modes
  67. ;    ; available on common Amiga graphic cards, but I have no information
  68. ;    ; on them yet.  If you know about such modes please contact me.
  69. ;
  70. ;    ; Setting this LONG to zero means your application doesn't support
  71. ;    ; any Chunky orientated display modes.
  72. ;
  73. ;    EITEM rtg_PlanarSupport ;[0] This LONG is used to indicate which
  74. ;                            ;Planar modes this application supports.  A
  75. ;                            ;set bit means the mode is supported:
  76. ;    ; Bit 0: Indicates it supports 1 bitplane non-interleaved
  77. ;    ; Bit 1: Indicates it supports 2 bitplanes non-interleaved
  78. ;    ; (...)
  79. ;    ; Bit 7: Indicates it supports 8 bitplanes non-interleaved
  80. ;
  81. ;    ; Bit 16: Indicates it supports 1 bitplane interleaved
  82. ;    ; Bit 17: Indicates it supports 2 bitplanes interleaved
  83. ;    ; (...)
  84. ;    ; Bit 23: Indicates it supports 8 bitplanes interleaved
  85. ;
  86. ;    ; Bit 15: Indicates it supports EHB mode (6 bitplanes) non-interleaved
  87. ;    ; Bit 31: Indicates it supports EHB mode (6 bitplanes) interleaved
  88. ;
  89. ;    ; Note that all planar modes are color-mapped.  Bits 8-14 and 24-30
  90. ;    ; are unused for now, but could be used later to support planar modes
  91. ;    ; with even higher number of bitplanes.
  92. ;
  93. ;    ; Setting this LONG to zero means your application doesn't support
  94. ;    ; any Planar orientated display modes.
  95.  
  96. *** End of OpenRtgScreenTagList() enumeration ***
  97.  
  98.  
  99. * This structure is private and for the internal use of RtgMaster.library
  100. * and its sub-libraries ONLY.  This structure will change in the future.
  101.  
  102.  STRUCTURE RtgDimensionInfo,0
  103.   ULONG rdi_Width    ; in pixels
  104.   ULONG rdi_Height   ; in pixels
  105.   LABEL rdi_SIZEOF
  106.  
  107. * This structure is private and for the internal use of RtgMaster.library
  108. * and its sub-libraries ONLY.  This structure will change in the future.
  109.   
  110.  STRUCTURE ScreenMode,0
  111.   STRUCT sm_ScrNode,8     ; ln_Succ and ln_Pred from ListNode structure
  112.  
  113.   APTR  sm_Name
  114.   APTR  sm_Description    ; Description of the graphics board this mode
  115.                           ; requires.  For example: "Standard Amiga Chipset".
  116.                           ; Description should not be longer than 31
  117.                           ; characters including terminating NULL-byte.  This
  118.                           ; pointer might be zero so watch out.
  119.   ULONG sm_GraphicsBoard  ; The graphics board this mode requires
  120.   ULONG sm_ModeID         ; ModeID (depends on sm_GraphicsBoard)
  121.   STRUCT sm_Reserved,8    ; 8 bytes reserved space for use of the sub-library
  122.                           ; who creates this ScreenMode structure.  This is
  123.                           ; PRIVATE to the sub-library!
  124.  
  125.   ULONG sm_MinWidth       ; minimum width in pixels
  126.   ULONG sm_MaxWidth       ; maximum width in pixels
  127.   ULONG sm_MinHeight      ; minimum height in pixels
  128.   ULONG sm_MaxHeight      ; maximum height in pixels
  129.  
  130.   STRUCT sm_Default,rdi_SIZEOF  ; Standard width and height of this ScreenMode
  131.   STRUCT sm_TextOverscan,rdi_SIZEOF  ; Settable via preferences
  132.   STRUCT sm_StandardOverscan,rdi_SIZEOF  ; Standard overscan size
  133.   STRUCT sm_MaxOverscan,rdi_SIZEOF  ; Maximum width and height (without the
  134.                                     ; need for AutoScrolling).  Hardware
  135.                                     ; dependant.
  136.  
  137.   ULONG sm_ChunkySupport  ; This LONG is used to indicate which Chunky
  138.                           ; modes this ScreenMode supports.  A set bit
  139.                           ; means the mode is available.  See the
  140.                           ; rtg_ChunkySupport tag for more information.
  141.                           ; Note that the same ScreenMode may never
  142.                           ; use two different layouts (for example BGR
  143.                           ; and RGB)
  144.  
  145.   ULONG sm_PlanarSupport  ; This LONG is used to indicate which Planar
  146.                           ; modes this ScreenMode supports.  A set bit
  147.                           ; means the mode is available.  See the
  148.                           ; rtg_PlanarSupport tag for more information.
  149.                           ; Note that the same ScreenMode may never
  150.                           ; use both interleaved and non-interleaved
  151.                           ; layouts.
  152.  
  153.   ULONG sm_PixelAspect    ; For a PAL 320x256 screen you have to write
  154.                           ; this value here:  sm_PixelAspect =
  155.                           ; (320/4)/(256/3) * 65536
  156.                           ;
  157.                           ; This tells the relation between the height and
  158.                           ; the width of a single pixel on 4:3 screen.  For
  159.                           ; a 640x480 screen this value is 1*65536.
  160.  
  161.   ULONG sm_VertScan       ; Vertical scan rate of this screenmode
  162.                           ; (in Hz)
  163.   ULONG sm_HorScan        ; Horizontal scan rate of this screenmode
  164.                           ; (in Hz)
  165.   ULONG sm_PixelClock     ; Pixelclock rate (in Hz)
  166.   ULONG sm_VertBlank      ; Vertical blank rate of this screenmode
  167.                           ; (in Hz)  (How often the VBlank interupt
  168.                           ; is triggered)
  169.   ULONG sm_Buffers        ; The number of buffers this ScreenMode can
  170.                           ; can handle.  This should always be atleast
  171.                           ; 1, 2 if the Screen can do double-buffering
  172.                           ; and 3 if it can do triple-buffering.
  173.  
  174.   UWORD sm_BitsRed        ; The number of bits per gun for Red
  175.   UWORD sm_BitsGreen      ; The number of bits per gun for Green
  176.   UWORD sm_BitsBlue       ; The number of bits per gun for Blue
  177.  
  178.   LABEL sm_SIZEOF
  179.  
  180. * The TagItem ID's (ti_Tag values) for GetRtgScreenData()
  181. *
  182. * These tags are used to return data to the user about the RtgScreen
  183. * structure in a future compatible way.
  184.  
  185.     ENUM TAG_USER+1
  186.  
  187.     EITEM grd_Width         ;Gets you the Width in pixels of the screen
  188.     EITEM grd_Height        ;Gets you the Height in pixels of the screen
  189.     EITEM grd_PixelLayout   ;Gets you the pixellayout of the screen, see
  190.                             ;defines below.  This also tells you whether
  191.                             ;the screen is Chunky or Planar
  192.     EITEM grd_ColorSpace    ;Gets you the colorspace of the screen, see
  193.                             ;defines below
  194.     EITEM grd_Depth         ;The number of colors LOG 2.  For Planar modes
  195.                             ;this also tells you the number of bitplanes.
  196.                             ;Don't rely on this number except to get the
  197.                             ;number of colors for Chunky modes.
  198.     EITEM grd_PlaneSize     ;Tells you the number of bytes to skip to get
  199.                             ;to the next (bit)plane.  You can use this to
  200.                             ;find the start addresses of the other (bit)planes
  201.                             ;in Planar and in (BytePlane) Chunky modes
  202.     EITEM grd_BytesPerRow   ;The number of bytes taken up by a row.  This
  203.                             ;refers to one (bit/byte)plane only for modes
  204.                             ;working with planes.
  205.     EITEM grd_MouseX        ; The X coordinate of the mouse pointer
  206.     EITEM grd_MouseY        ; The Y coordinate of the mouse pointer
  207.     EITEM grd_BusSystem     ; To which Bussystem is the Board connected ?
  208.  
  209. grd_Z3 EQU 1 ; Zorro III
  210. grd_Z2 EQU 2 ; Zorro II
  211. grd_Custom EQU 3 ; Custom Chipset
  212. grd_RGBPort EQU 4 ; connected to RGB Port
  213. grd_GVP EQU 5 ; EGS 110 is connected to "special" bus of GVP Turbo Board
  214. grd_DDirect EQU 6 ; DraCo Direct Bus
  215.  
  216. * defines for grd_PixelLayout
  217.  
  218. grd_PLANAR     EQU 0    ; Non interleaved planar layout [X bitplanes/pixel]
  219. grd_PLANARI    EQU 1    ; Interleaved planar layout     [X bitplanes/pixel] 
  220. grd_CHUNKY     EQU 2    ; 8-bit Chunky layout           [BYTE/pixel]
  221. grd_HICOL15    EQU 3    ; 15-bit Chunky layout          [WORD/pixel]
  222. grd_HICOL16    EQU 4    ; 16-bit Chunky layout          [WORD/pixel]
  223. grd_TRUECOL24  EQU 5    ; 24-bit Chunky layout          [3 BYTES/pixel]
  224. grd_TRUECOL24P EQU 6    ; 24-bit Chunky layout          [3 BYTEPLANES/pixel]
  225. grd_TRUECOL32  EQU 7    ; 24-bit Chunky layout          [LONG/pixel] (RGBx or BGRx)
  226. grd_GRAFFITI   EQU 8    ; 8-bit Graffiti-type Chunky layout (very special...)
  227. grd_TRUECOL32B EQU 9    ; 24-bit Chunky layout          [LONG/pixel] (xRGB or xBGR)
  228.  
  229. * defines for grd_ColorSpace
  230.  
  231. grd_Palette    EQU 0    ; Mode uses a Color Look-Up Table (CLUT)
  232. grd_RGB        EQU 1    ; standard RGB color space
  233. grd_BGR        EQU 2    ; high-endian RGB color space, BGR
  234. grd_RGBPC      EQU 3    ; RGB with lowbyte and highbyte swapped
  235. grd_BGRPC      EQU 4    ; BGR with lowbyte and highbyte swapped
  236.  
  237. *** End of GetRtgScreenData() enumeration ***
  238.  
  239.  
  240. * Information about the RtgScreenModeReq tags:
  241. *
  242. * Each tag specified for the RtgScreenModeReq() function limits in some
  243. * way the number of ScreenModes available to the user.  Sometimes this
  244. * means a screenmode is completely ommited, and sometimes this means
  245. * certain screenmodes can only be used if the user selects them to
  246. * be wide enough.  So for example, a ScreenMode which supports screens
  247. * of 300 to 400 pixels in width, could be filtered out completely by
  248. * setting smr_MinWidth to 401.  But if the smr_MinWidth is set to for
  249. * example 320 then the user is allowed to select a width of 320-400
  250. * pixels (for this ScreenMode, and if the smr_MaxWidth allows this).
  251. * If smr_MinWidth is 200 pixels then the ScreenMode is the limiting
  252. * factor which means the user can't select ScreenModes smaller than
  253. * 300 pixels.
  254. *
  255. * The PlanarSupport and ChunkySupport tags determine which ScreenModes
  256. * are available to the user depending on their layout and number of
  257. * colors.
  258.  
  259. * This structure is private and for the internal use of RtgMaster.library
  260. * and its sub-libraries ONLY.  This structure will change in the future.
  261.  
  262.  STRUCTURE ScreenReq,0
  263.   ULONG sq_ScreenMode ; Ptr to ScreenMode structure
  264.   ULONG sq_Width      ; Must be within Tag specified limits
  265.   ULONG sq_Height     ; The width and height which the user selected
  266.   UWORD sq_Depth      ; Number of colors log2 which the user selected
  267.   UWORD sq_Overscan   ; 0 = No Overscan.  See defines below.
  268.   UBYTE sq_Flags      ; Bit 0 set: EHB selected (sq_Depth = 6)
  269.                       ; Bit 1 set: Chunky mode
  270.                       ; Bit 2 set: Default X gadget selected
  271.                       ; Bit 3 set: Default Y gadget selected
  272.                       ; Bit 4 set: Autoscroll gadget selected
  273.                       ; Bit 5 set: B&W gadget selected
  274.   LABEL sq_SIZEOF
  275.  
  276. * Bits set in sq_Flags
  277.  
  278. sq_EHB          EQU 1 ; EHB selected (sq_Depth = 6)
  279. sq_CHUNKYMODE   EQU 2 ; Chunky Mode selected
  280. sq_DEFAULTX     EQU 4 ; Default Width selected
  281. sq_DEFAULTY     EQU 8 ; Default Height selected
  282.  
  283.  
  284. * defines for sq_Overscan
  285.  
  286. sq_NOOVERSCAN        EQU 0
  287. sq_TEXTOVERSCAN      EQU 1   ; User setable, should be entirely visible
  288. sq_STANDARDOVERSCAN  EQU 2   ; Standard overscan (just past edges)
  289. sq_MAXOVERSCAN       EQU 3   ; Maximum overscan (as much as possible)
  290.  
  291. * This structure is private and for the internal use of RtgMaster.library
  292. * and its sub-libraries ONLY.  This structure will change in the future.
  293.  
  294.  STRUCTURE RtgScreen,0
  295.   ULONG rs_LibBase        ; Sub-library base for this ID
  296.   UWORD rs_LibVersion     ; Sub-library version for this ID
  297.   UWORD rs_Pad1
  298.   ULONG rs_GraphicsBoard  ; ID
  299.   STRUCT rs_Reserved,20
  300.   ULONG rs_MouseX
  301.   ULONG rs_MouseY
  302.   APTR  rs_c2pcode
  303.   APTR rs_c2pdata
  304.   ULONG rs_c2pcurr
  305.   STRUCT rs_c2pname,30
  306.   ; This structure is just a fixed-size header for the real sub library's
  307.   ; and graphics board's specific RtgScreen structure.  These are stored
  308.   ; in the rtgXXXX.i files
  309.   LABEL rs_SIZEOF
  310.  
  311.         ENDC
  312.